import java.util.Arrays;

class MyArray<T> {
    //泛型
    Object[] Array = new Object[4];
    public void setArray(int pos, T value) {
        this.Array[pos] = value;
    }
    public T getArray(int pos) {
        return (T)Array[pos];
    }
    public String toString(Object[] Array) {
        return "dada";
    }

}
public class test {
    public static void main(String[] args) {
//        MyArray<Integer> myArray = new MyArray<Integer>();
//        myArray.setArray(0,2);
//        myArray.setArray(1,3);
//        myArray.setArray(2,4);
//        System.out.println(myArray.getArray(0));
//        System.out.println(myArray.getArray(1));
//        System.out.println(myArray.toString(myArray.Array));
//
        MyArray<String> myArray = new MyArray<String>();
        myArray.setArray(0, "jennie");
        myArray.setArray(1, "lisa");
        myArray.setArray(2, "rose");
        myArray.setArray(3, "jisso");
        System.out.println(Arrays.toString(myArray.Array));
    }
}
